package com.ytc.mapper;

import com.ytc.model.Bookshelf;
import org.apache.ibatis.annotations.Param;

/**
* @author 25645
* @description 针对表【my_bookshelf】的数据库操作Mapper
* @createDate 2023-01-08 11:49:55
* @Entity com.ytc.model.Bookshelf
*/
public interface BookshelfMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Bookshelf record);

    int insertSelective(Bookshelf record);

    Bookshelf selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Bookshelf record);

    int updateByPrimaryKey(Bookshelf record);

    //柴晓颖：查询收藏数
    Long queryShelfNum(@Param("blId") Integer blId);

    //张阔：加入书架
    void addShelf(@Param("uId") Integer uId,@Param("blId") Integer blId);

    //张阔：查询该书籍是否加入书架
    Bookshelf queryShelfByUidAndBid(@Param("uId") Integer uId,@Param("blId") Integer blId);

}
